package com.yaodian100.ec.memberevent.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 
 * @author apple.chang
 * 
 */
@Entity
@Table(name = "EC_MEMBEREVENT")
public class MemberEvent extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6738444503839627165L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_memberevent")
	@SequenceGenerator(name = "seq_ec_memberevent", sequenceName = "SEQ_EC_MEMBEREVENT")
	@Column(name = "ID", length = 10, nullable = false)
	private String id;

	@Column(name = "APPLY_SOURCE", length = 50, nullable = false)
	private String applySource;

	/**
	 * 赠送种类 1: coupon 2:购物金
	 */
	@Column(name = "TYPE", length = 1, nullable = false)
	private String type;

	/**
	 * coupon uuid
	 */
	@Column(name = "COUPON_UUID")
	private String coupon_uuid;

	/**
	 * 購物金金额
	 */
	@Column(name = "AMOUNT")
	private BigDecimal amount = new BigDecimal(0.00);

	/**
	 * 活动起始日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "START_DATE")
	private Date startDate;

	/**
	 * 活动结束日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE")
	private Date endDate;

	/**
	 * 购物金多久候生效
	 */
	@Column(name = "WAIT_ACTIVATE_DAYS")
	private int waitActivateDays;

	/**
	 * 购物金效期
	 */
	@Column(name = "AVAILABLE_DAYS")
	private int availableDays;

	/**
	 * 活动说明
	 */
	@Column(name = "MEMO", length = 100, nullable = false)
	private String memo;

	public MemberEvent() {
		super();
	}

	/**
	 * @return the applySource
	 */
	public String getApplySource() {
		return applySource;
	}

	/**
	 * @param applySource the applySource to set
	 */
	public void setApplySource(String applySource) {
		this.applySource = applySource;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the coupon_uuid
	 */
	public String getCoupon_uuid() {
		return coupon_uuid;
	}

	/**
	 * @param couponUuid the coupon_uuid to set
	 */
	public void setCoupon_uuid(String couponUuid) {
		coupon_uuid = couponUuid;
	}

	/**
	 * @return the amount
	 */
	public BigDecimal getAmount() {
		return amount;
	}

	/**
	 * @param amount the amount to set
	 */
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	/**
	 * @return the startDate
	 */
	public Date getStartDate() {
		return startDate;
	}

	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	/**
	 * @return the waitActivateDays
	 */
	public int getWaitActivateDays() {
		return waitActivateDays;
	}

	/**
	 * @param waitActivateDays the waitActivateDays to set
	 */
	public void setWaitActivateDays(int waitActivateDays) {
		this.waitActivateDays = waitActivateDays;
	}

	/**
	 * @return the availableDays
	 */
	public int getAvailableDays() {
		return availableDays;
	}

	/**
	 * @param availableDays the availableDays to set
	 */
	public void setAvailableDays(int availableDays) {
		this.availableDays = availableDays;
	}

	/**
	 * @return the memo
	 */
	public String getMemo() {
		return memo;
	}

	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @return the endDate
	 */
	public Date getEndDate() {
		return endDate;
	}

	/**
	 * @param endDate the endDate to set
	 */
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}